home *** CD-ROM | disk | FTP | other *** search
- Path: news-m01.ny.us.ibm.net!usenet
- From: bbogard@ibm.net
- Newsgroups: comp.lang.c++
- Subject: Re: Simple inheritance Q
- Date: 28 Feb 1996 16:37:05 GMT
- Message-ID: <4h20bh$154o@news-s01.ny.us.ibm.net>
- References: <4gumo0$hta@netlab.cs.rpi.edu>
- Reply-To: bbogard@ibm.net
- NNTP-Posting-Host: slip37-223-98.ibm.net
- X-Newsreader: IBM NewsReader/2 v1.2.5
-
- >then I get the error in line 3:
- > Can not convert Cat * to Animal *
- >
- >But if I define
- > class Cat:public Animal{...
- >
- >everything is fine.
- >
- >Can anyone tell me why?
- you must inherit publically in order for cat to see animals constructor. If cat can't see animal's
- constructor, you will get the error you are getting.
-